package top.lcm889.oj.leetcodeTop200;

import top.lcm889.oj.databean.ListNode;

/**
 * @author Coder-lcm
 * @date 2021/5/3
 */
public class LC2_两数相加 {
    public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
        StringBuilder sb = new StringBuilder();
        StringBuilder sb2 = new StringBuilder();
        while (l1 != null || l2 != null) {
            if (l1 != null) {
                sb.append(l1.val);
                l1 = l1.next;
            }
            if (l2 != null) {
                sb2.append(l2.val);
                l2 = l2.next;
            }
        }
        Integer num1 = Integer.parseInt(sb.reverse().toString());
        Integer num2 = Integer.parseInt(sb2.reverse().toString());
        return null;
    }

    public static void main(String[] args) {
        LC2_两数相加 test = new LC2_两数相加();

    }
}
